import React from 'react'
import { Consumer } from '../Form/FormContext'
export default function Button(props) {
  return (
    <Consumer>
      {ctx=>{
        return (
          <button onClick={()=>{
            ctx.sumbitVal()
          }}>
          {props.children}
        </button>
        )
      }}
   
    </Consumer>
  )
}
